package IO;

import java.io.*;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: hp
 * Date: 2024-08-26
 * Time: 16:42
 */
public class Demo6 {
    public static void main(String[] args) {
        try(OutputStream outputStream = new FileOutputStream("./text.txt",true)) {
            //outputStream.write(97);
            byte[] buffer = {(byte)0xe4,(byte)0xbd,(byte)0xa0,(byte)0xe5,(byte)0xa5,(byte)0xbd};
            outputStream.write(buffer,1,3);
            //outputStream.write(buffer);
            /*outputStream.write(0xe4);
            outputStream.write(0xbd);
            outputStream.write(0xa0);
            outputStream.write(0xe5);
            outputStream.write(0xa5);
            outputStream.write(0xbd);*/
        }catch (IOException e) {
            e.printStackTrace();
        }
    }
}
